document.addEventListener('DOMContentLoaded', function() {
    const container = document.getElementById('multiplicationTable');
    const maxNumber = 9; 

    for (let i = 1; i <= maxNumber; i++) {
      
      const row = document.createElement('div');
      row.className = 'row';

      for (let j = 1; j <= i; j++) {
        const cell = document.createElement('div');
        cell.className = 'table-cell';
        cell.textContent = `${i} x ${j} = ${i * j}`;
        row.appendChild(cell);
      }

      container.appendChild(row);
      
    }
  });